function calcParallax(tileheight, speedratio, scrollposition) {
	return (tileheight - (Math.floor(scrollposition / speedratio) % (tileheight+1)));
}
window.onload = function() {
	window.onscroll = function() {
		var posY = (document.documentElement.scrollTop) ? document.documentElement.scrollTop : window.pageYOffset;
		var map = document.getElementById('map');
		var mapparallax = calcParallax(3430, 8, posY);
		map.style.backgroundPosition = "0 " + mapparallax + "px"; 

		var ufo = document.getElementById('ufo');
		var ufoparallax = calcParallax(1320, -10, posY);
		ufo.style.backgroundPosition = "0 " + ufoparallax + "px"; 
	}
}